import sqlite3
#连 接 SQLite 数据库，数据库文件是 mrsoft.db
conn = sqlite3.connect('./mrsoft.db')
# 创建一个 cursor
cursor = conn.cursor()
cursor.execute('update user set name = ? where id = ?', ('Harry', 1))
cursor.execute('select * from user')
result = cursor.fetchall()
print(result)
# 关闭游标
cursor.close()
# 提交事务
conn.commit()
# 关闭Connection:gggi
conn.close()